<template>
  <div class="container">
    <global-header></global-header>
    <div class="main-wrapper">
      <nav-list></nav-list>
      <div class="main-content">
        <router-view :key="key" />
      </div>
    </div>
    <global-footer></global-footer>
  </div>
</template>

<script>
import { NavList, GlobalHeader, GlobalFooter } from '@/components'

export default {
  components: {
    NavList,
    GlobalHeader,
    GlobalFooter
  },
  name: 'MainLayout',
  computed: {
    key () {
      return this.$route.path
    }
  }
}
</script>

<style scoped>
  .container {
    background: #f5f5f5;
  }
  .container .main-wrapper {
    width: 1190px;
    margin: 0 auto;
    overflow: hidden;
  }
  .container .main-wrapper .main-content {
    width: 1010px;
    float: right;
    padding-top: 10px;
  }
</style>
